package yunjiao.javatutorials.apache.kafka.model;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 业务消息类
 *
 * @author yangyunjiao
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class InventoryUpdateEvent extends BaseMessage {
    private String productId;
    private Integer quantity;
    private OperationType operation; // DECREASE, INCREASE
    private String orderId;

    public enum OperationType {
        DECREASE, INCREASE
    }
}
